from todo_api_project.base.mybase import Tools


class complete_model(Tools):
    path = '/task/info'

    def complete_action(self, task_id, hd):
        complete_data = {
            "task_id": task_id
        }
        complete = self.huihua.put(url=self.hosturl+self.path, data=complete_data, headers=hd)
        return complete.json()


# from todo_api_project.api.login_api import login_model
# from todo_api_project.api.create_api import create_model
# import requests
# s = requests.session()
# login = login_model(huihua=s)
# msg = login.login_action(usr='rrer123', pwd='rr1234', check='1234')
# print(msg)
# getuserId = msg['userId']
# getuserToken = msg['userToken']
# hd = {"userId": getuserId, "userToken": getuserToken}


# complete = complete_model(huihua=s)
# msg = complete.complete_model(task_id=, hd=hd)
# print(msg)